/*
 * MediaType.h
 *
 *  Created on: 2016年1月12日
 *      Author: terry
 */

#ifndef MEDIATYPE_H_
#define MEDIATYPE_H_

#include "BasicType.h"
#include <string>


namespace av
{

typedef std::string		String;


enum MediaType
{
    MEDIA_TYPE_NONE  = -1,
    MEDIA_TYPE_VIDEO = 0,
    MEDIA_TYPE_AUDIO,
	MEDIA_TYPE_DATA,
	AVMEDIA_TYPE_SUBTITLE
};


enum StreamState
{
    STATE_STOPPED = 0,
	STATE_PAUSED,
	STATE_PLAYING
};


enum StreamEvent
{
	STREAM_EVENT_END = 0x10

};

enum MediaCodec
{
    MEDIA_CODEC_NONE = 0,

    MEDIA_CODEC_H264 = 28,
    MEDIA_CODEC_VP8  = 141,
    MEDIA_CODEC_MPEG4= 13,
    MEDIA_CODEC_THEORA=31,

    MEDIA_CODEC_G711U = 65542,
    MEDIA_CODEC_G711A,

    MEDIA_CODEC_MP3 = 0x15001,
    MEDIA_CODEC_AAC = 0x15002,
    MEDIA_CODEC_AC3 = 0x15003,
    MEDIA_CODEC_VORBIS = 0x15005,
    MEDIA_CODEC_OPUS = 0x1503d,
	MEDIA_CODEC_RAW = 0x10101010

};


/// pixel format
enum APixelFormat
{
	PIXEL_FORMAT_NONE = 0,
    PIXEL_FORMAT_I420,  /* yuv 4:2:0 planar */
    PIXEL_FORMAT_YV12,  /* yvu 4:2:0 planar */
    PIXEL_FORMAT_NV12,  /* yuv 4:2:0, with one y plane and one packed u+v */
    PIXEL_FORMAT_I422,
    PIXEL_FORMAT_I444,
    PIXEL_FORMAT_BGR,
    PIXEL_FORMAT_BGRA,
    PIXEL_FORMAT_RGB,    // RGB24
    PIXEL_FORMAT_YUY2,
    PIXEL_FORMAT_UYVY,
    PIXEL_FORMAT_RGB32,

    PIXEL_FORMAT_MAX /* end of list */
};

/// sample format








} /* namespace av */

#endif /* MEDIATYPE_H_ */
